package com.globallogic.vkulyk.SSHTool;

public class SocketDataKeeper {
	private String host = "";
	private int port = 0;

	public SocketDataKeeper(String host, int port) {
		this.host = host;
		this.port = port;
	}

	public String getHost() {
		return host;
	}

	public int getPort() {
		return port;
	}

	public int hashCode() {
		return host.hashCode() + port;
	}

	public boolean equals(Object thatObj) {
		if (this == thatObj) return true;
		return thatObj instanceof SocketDataKeeper
				&& host.equals(((SocketDataKeeper) thatObj).getHost())
				&& port == ((SocketDataKeeper) thatObj).getPort();
	}

	public String toString() {
		return host + " " + port;
	}

}
